extends layout/navbar

block link
    link(rel='stylesheet', href='/vendor/bootstrap-3.3.7/bootstrap.min.css')
    link(rel='stylesheet' href='/vendor/fullcalendar-3.1.0/fullcalendar.css')
    link(rel='stylesheet', href='/vendor/bootstrap-notify/animate.css')
    link(rel='stylesheet', href='/css/myReservation.css')

block content

    - user = typeof(user) != 'undefined' ? user : { }
    input(type='hidden', value= user)#user


    div#reservation-container
        div.row
            section.content
                h1 我的预约
                div.col-md-8.col-md-offset-2
                    div.panel.panel-default
                        div.panel-body
                            div.pull-right
                                div.btn-group
                                    button.btn.btn-primary.btn-filter(type='button', data-target='finished') 已结束
                                    button.btn.btn-success.btn-filter(type='button', data-target='success') 申请成功
                                    button.btn.btn-warning.btn-filter(type='button', data-target='loading') 申请中
                                    button.btn.btn-danger.btn-filter(type='button', data-target='failed') 申请失败
                                    button.btn.btn-default.btn-filter(type='button', data-target='all') 全部
                            .table-container
                                table#table-filter.table.table-filter
                                    tbody
                                        each item in list
                                            //tr#status(data-status='failed')
                                            tr(data-status=item.status)#status.item-tr
                                                td
                                                    button(role=item.id, status=item.status).remove-reservation.btn.btn-primary.pull-right    删除
                                                    button(role=item.id).update-reservation.btn.btn-primary.pull-right    修改
                                                    button(role=item.id).show-reservation.btn.btn-primary.pull-right    查看
                                                    //btn.btn-primary.pull-right.failed 查看
                                                    h4(class=item.status)#status-text.title
                                                        | !{item.msg}
                                                        //| 申请失败
                                                    span.start-end.media-meta.pull-right !{item.startEnd}
                                                    p.title.summary #{item.title}
                                                    //p#title.summary 科技部申请第一会议室
block scripts
    //script(src='/vendor/moment.min.js')
    script(src='/vendor/jquery-3.1.1/jquery-3.1.1.min.js')
    script(src='/vendor/bootstrap-3.3.7/bootstrap.min.js')
    //script(src='/vendor/fullcalendar-3.1.0/fullcalendar.js')
    script(src='/vendor/bootstrap-notify/bootstrap-notify.js')
    script(src='/vendor/bootbox.min.js')
    script(src='/js/views/myNotify.js')
    //script(src='/vendor/fullcalendar-3.1.0/zh-cn.js')
    script(src='/js/views/myReservation.js')